<template>
  <view class="top flex-center" @click="handTop">
    <text class="iconfont icon-zhidingmian"></text>
  </view>
</template>

<script setup>
import { ref } from 'vue'
const handTop = () => {
  uni.pageScrollTo({
    scrollTop: 0, // 滚动到页面顶部
    duration: 300 // 滚动时间（毫秒）
  })
}
</script>

<style lang="scss" scoped>
.top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);

  .icon-zhidingmian {
    font-size: 24px;
    color: #42a5f5;
  }
}
</style>
